package com.doaio.serviceorder.controller;

import com.doaio.serviceorder.feign.UserFeignApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HomeController {

    @Autowired
    private UserFeignApi userFeignApi;

    @RequestMapping("/hello")
    public String hello(){
        String name = userFeignApi.getName();
        return "hello," + name + "!";
    }

    @RequestMapping("/")
    public String index(){
        return "i am service-order";
    }

}
